from apps.ext import db

class Movies(db.Model):
    mid = db.Column(db.Integer,primary_key=True)
    show_name = db.Column(db.String(64), nullable=False,index=True,unique=True)
    show_name_en = db.Column(db.String(64), nullable=False, index=True)
    director = db.Column(db.String(32), nullable=False, index=True)
    leading_role = db.Column(db.String(256), nullable=False, index=True)
    type = db.Column(db.String(64), nullable=False, index=True)
    country = db.Column(db.String(32), nullable=False)
    language = db.Column(db.String(32), nullable=False)
    duration = db.Column(db.String(32), nullable=False)
    screening_model = db.Column(db.String(32), nullable=False)
    open_day = db.Column(db.Date)
    pic = db.Column(db.String(256), nullable=False)
    flag = db.Column(db.SmallInteger, default=1)
    is_delete = db.Column(db.Boolean, default=1)




class area(db.Model):
    aid = db.Column(db.Integer, primary_key=True)
    parent_id = db.Column(db.Integer)
    short_name = db.Column(db.String(64), nullable=False, index=True, unique=True)
    name = db.Column(db.String(64), nullable=False, index=True, unique=True)
    merger_name = db.Column(db.String(64), nullable=False)
    level = db.Column(db.String(64), nullable=False)
    pinyin = db.Column(db.String(64), nullable=False)
    code = db.Column(db.String(64), nullable=False)
    zip_code = db.Column(db.String(64), nullable=False)
    first = db.Column(db.String(64), nullable=False)
    lng = db.Column(db.String(64), nullable=False)
    lat = db.Column(db.String(64), nullable=False)
    is_hot = db.Column(db.Boolean,default=0)









